package com.ssy.lingxi.member.merchant.model.bo;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * 用户登录后返回给前端页面的响应VO
 * @author 万宁
 * @version 2.0.0
 * @date 2020-07-01
 */
public class ManageLoginBO implements Serializable {
    private static final long serialVersionUID = 5464397323235310561L;

    public ManageLoginBO() {
    }

    public ManageLoginBO(Long userId, Long memberId, Long memberRoleId, String token, String account, String name,  Long tokenExpireMinutes, List<String> urls, List<LoginAuthBO> auth) {
        this.userId = userId;
        this.memberRoleId = memberRoleId;
        this.memberId = memberId;
        this.token = token;
        this.account = account;
        this.name = name;
        this.tokenExpireMinutes = tokenExpireMinutes;
        this.urls = urls;
        this.auth = auth;
    }

    public ManageLoginBO(Long userId, Long memberId, Long memberRoleId, String token, String account, String name,  Long tokenExpireMinutes, List<String> urls) {
        this.userId = userId;
        this.memberRoleId = memberRoleId;
        this.memberId = memberId;
        this.token = token;
        this.account = account;
        this.name = name;
        this.tokenExpireMinutes = tokenExpireMinutes;
        this.urls = urls;
        this.auth = new ArrayList<>();
    }

    /**
     * 用户id (前端进行缓存，在Http Headers中添加)
     */
    private Long userId;

    /**
     * 用户所属会员Id (前端进行缓存，在Http Headers中添加)。同时也用于切换会员下拉框
     */
    private Long memberId;

    /**
     * 会员角色Id
     */
    private Long memberRoleId;

    /**
     * 用户Token (前端进行缓存，在Http Headers中添加)
     */
    private String token;

    /**
     * 用户账号
     */
    private String account;

    /**
     * 用户姓名
     */
    private String name;

    /**
     * Token过期时间（单位：分钟）
     */
    private Long tokenExpireMinutes;

    /**
     * 用户授权访问的前端页面菜单Url列表
     */
    private List<String> urls;

    /**
     * 用户菜单及按钮权限
     */
    private List<LoginAuthBO> auth;

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getMemberId() {
        return memberId;
    }

    public void setMemberId(Long memberId) {
        this.memberId = memberId;
    }

    public Long getMemberRoleId() {
        return memberRoleId;
    }

    public void setMemberRoleId(Long memberRoleId) {
        this.memberRoleId = memberRoleId;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public String getAccount() {
        return account;
    }

    public void setAccount(String account) {
        this.account = account;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Long getTokenExpireMinutes() {
        return tokenExpireMinutes;
    }

    public void setTokenExpireMinutes(Long tokenExpireMinutes) {
        this.tokenExpireMinutes = tokenExpireMinutes;
    }

    public List<String> getUrls() {
        return urls;
    }

    public void setUrls(List<String> urls) {
        this.urls = urls;
    }

    public List<LoginAuthBO> getAuth() {
        return auth;
    }

    public void setAuth(List<LoginAuthBO> auth) {
        this.auth = auth;
    }
}
